﻿<style type="text/css">
</style>
<div class="order-list">
    <ul>
        <li v-for="data in bag.datas">
            <div class="order-cont">
                <div class="order-top">
                    <a>
                        <p><i class="iconfont icon-quanbudingdan"></i><span v-text="data.username + '('+data.id+')'">-</span><i class="iconfont icon-xiayibu top-i"></i></p>
                        <p v-text="data.moblie">-</p>
                    </a>
                </div>
                <div class="order-bottom">
                    <a v-text="data.addtime" style="border: none;float: left;color: #43527f">-</a>
                    <a v-if="data.isreal == true" class="mv-btn-red">已实名</a>
                    <a v-if="data.isreal == false" class="mv-btn-blue">未实名</a>
                </div>
            </div>
        </li>
    </ul>
</div>
<div style="text-align:center;margin-top:0.5em;" v-if="bag.dataend == false">
    <a v-on:click="more" v-text="morename" style="color:#888;">-</a>
</div>
<div style="text-align:center;margin-top:0.5em;" v-if="bag.dataend == true">
    <a style="color:#aaa;">已显示所有</a>
</div>
<div style="height:60px;"></div>
<script type="text/javascript">
    var pagedata = {
        request: {
            method: "VIEW_USER_RECOMLISTS",
            depth: 2,
            page: 0
        },
        screen: {
            header_display: true,
            header_title_name: "我的推荐",
            header_exit_name: "返回",
            header_exit_click: function () {
                mview.view.load('/views/User/setting.html')
            },
            header_display: true,
            footer_choose: "user"
        },
        data: {
            morename: "查看更多"
        },
        methods: {
            //加载更多
            more: function () {
                pagedata.request.page += 1;
                mview.socket.send({
                    data: {
                        method: "VIEW_USER_RECOMLISTS",
                        page: pagedata.request.page,
                        depth: pagedata.request.depth,
                        part: 1
                    },
                    success: function (json) {
                        if (json.Code == 0 && json.Data.datas.length > 0) {
                            for (var i in json.Data.datas) {
                                var data = json.Data.datas[i];
                                mview.vue.stage.$data.bag.dataend = json.Data.dataend;
                                mview.vue.stage.$data.bag.datas.push(data);
                            }
                        }
                    }
                });
            }
        }
    }
    mview.view.chlid.init(pagedata);
</script>